import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import Student from '@/components/Students/Student'
import Work from '@/components/Students/Work'
import StudentAdd from '@/components/Students/StudentAdd'
import classGallery from "@/dataGallery/classGallery"
import mapGallery from '@/dataGallery/mapGallery'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/Login',
      hidden: true,
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
      hidden: true,
    },
    {
      path: '/home',
      name: '学生管理',
      isIcon: 'fa fa-group',
      component: Home,
      children: [
        {
          path: '/home/student',
          name: '学生列表',
          isIcon: 'fa fa-user',
          component: Student,
        },
        {
          path: '/home/work',
          name: '作业列表',
          isIcon: 'fa fa-ioxhost',
          component: Work,
        },
        {
          path: '/home/StudentAdd',
          name: '增加学员',
          component: StudentAdd,
          hidden: true,
        },
      ]
    },
    {
      path: '/dataGallery/classGallery',
      name: '数据概览',
      isIcon: 'fa fa-area-chart',
      component: Home,
      children: [
        {
          path: '/home/dataview',
          name: '班级数据',
          isIcon: 'fa fa-list',
          component: classGallery,
        },
        {
          path: '/home/mapview',
          name: '地图数据',
          isIcon: 'fa fa-map',
          component: mapGallery,
        },
      ]
    }
  ]
})
